var appInst = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
        tabbar: {},
  },


  onLoad: function (options) { 
    let that = this
     appInst.editTabbar(); //调用tabbar  
     
    var token = wx.getStorageSync('token')
    var {id} = wx.getStorageSync('userInfo')
    console.log(token)
    console.log(!isNaN(id))
      if(!isNaN(id)&&token){
        console.log(11111)
        that.setData({
          id
        })
        
      }else{
        wx.redirectTo({
          url: '/pages/login/login',
        })
      }
  },




})